#ifndef __LCD1602CMD_H__
#define __LCD1602CMD_H__

//for SET_MODE
#define CUR_LEFT 0x0
#define CUR_RIGHT 0x2
#define SCRN 0x0
#define SCRN_RIGHT 0x1

//for DISPLAY_CTL
#define  DISP_OFF 0x0
#define DISP_ON 0x4
#define NO_CURSOR 0x0
#define HAVE_CURSOR 0x2
#define HAVE_FLASH 0x0
#define NO_FLASH 0x1

//for SCREEN_MOVE_DIRECTION
#define SC_CLEAR 0x0 //curosr left 1
#define SC_SET 0x8 //cursor right 1
#define RL_CLEAR 0 // character left 1 ,but cursor dont shift
#define RL_SET 0x4 // character right 1 ,but cursor dont shift

//for FUNCTION_CONTROL
#define DL_CLEAR 0x0 // data bus is 4bits
#define DL_SET 0x10 //data bus is 8 bits
#define N_CLEAR 0x0 // show one row
#define N_SET 0x8 // show two rows
#define F_CLEAR 0x0 // 5*7 point array per character
#define F_SET 0x4 // 5*10 point array per character

//for CGRAM_CTL 
//[0-2] is row number
//[3-5] is character number
enum LCD1602CMD {
	CLEAR,
	CURSOR_RESET,
	SET_MODE,
	DISPLAY_CTL,
	SCREEN_MOVE_DIRECTION,
	FUNCTION_CTL,
	CGRAM_CTL,
	DDRAM_CTL,
	BF_AC_ADDRESS,
	WRITE_DDRAM,
	READ_DDRAM,
};
#endif
